class Solution {
public:
    int diagonalSum(vector<vector<int>>& mat) {
int  i,j,s = 0;
        for (i = 0; i < mat.size(); i++) {
            for (j = 0; j < mat.size(); j++) {
                if (i == j || i + j == mat.size() - 1) {
                    s += mat[i][j];
                }
            }
        }
        return s;
    }
};